/*
 * @Date: 2025-06-18 18:40:21
 * @Auth: 463997479@qq.com
 * @LastEditors: 463997479@qq.com
 * @LastEditTime: 2025-09-11 10:24:04
 * @FilePath: \corpus\src\services\ant-design-pro\foundation\index.ts
 */
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

export async function getIndustryCount(id: number, options?: { [key: string]: any }) {
  return request<{ data: { name: string; countNumber: number }[] }>(
    `/corpus/base/getIndustryCount?knowledgeId=${id}`,
    {
      method: 'get',

      ...(options || {}),
    },
  );
}
export async function getOriginList(params: any, options?: { [key: string]: any }) {
  return request<{ data: any[]; total: number }>('/corpus/base/getOriginList', {
    method: 'post',

    data: params,
    ...(options || {}),
  });
}

export async function getBaseList(params: any, options?: { [key: string]: any }) {
  return request<{ data: any[]; total: number }>('/corpus/base/getBaseList', {
    method: 'post',

    data: params,
    ...(options || {}),
  });
}

export async function getDeptList(data: any, options?: { [key: string]: any }) {
  return request<{ data: { name: string; countNumber: number }[] }>(
    `/corpus/knowledgeDept/getDeptList`,
    {
      method: 'post',

      ...(options || {}),
      data,
    },
  );
}

export async function getLevelCount(data: any, options?: { [key: string]: any }) {
  return request<{ data: any[] }>(`/corpus/base/getLevelCount `, {
    method: 'get',

    ...(options || {}),
  });
}
export async function getFileTypeCount(data: any, options?: { [key: string]: any }) {
  return request<{ data: any[] }>(`/corpus/base/getTypeCount`, {
    method: 'get',

    ...(options || {}),
  });
}

export async function getAnswerList(params: any, options?: { [key: string]: any }) {
  return request<{ data: any[]; total: number }>('/corpus/base/getAnswerList', {
    method: 'post',

    data: params,
    ...(options || {}),
  });
}
export async function getAksk(params: any, options?: { [key: string]: any }) {
  return request<{ data: any[] }>('/corpus/key/getList', {
    method: 'post',

    data: params,
    ...(options || {}),
  });
}
export async function updateApp(params: any, options?: { [key: string]: any }) {
  return request<{ data: any[] }>('/corpus/key/updateApp', {
    method: 'post',

    data: params,
    ...(options || {}),
  });
}

export async function generate(params: any, options?: { [key: string]: any }) {
  return request<{ data: any[] }>('/corpus/key/generate', {
    method: 'post',

    data: params,
    ...(options || {}),
  });
}
export async function priveiwUrl(id: any, options?: { [key: string]: any }) {
  return request<{ data: any[] }>(`/corpus/base/getFile?yklRel=${id}`, {
    method: 'get',
    ...(options || {}),
    responseType: 'blob',
  });
}
export async function deleteKey(id: string, options?: { [key: string]: any }) {
  return request<{ data: any[] }>(`/corpus/key/deleteKey?id=${id}`, {
    method: 'get',
    ...(options || {}),
  });
}
export async function priveiwUrlTest(id: any, options?: { [key: string]: any }) {
  return request<{ data: any[] }>(`/corpus/test?type=${id}`, {
    method: 'get',
    ...(options || {}),
    responseType: 'blob',
  });
}
